/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package modelo;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author fumio
 */
@Entity
public class Espaco implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idEspaco;
    private String espaco;
    
    public Long getIdEspaco() {
        return idEspaco;
    }

    public void setIdEspaco(Long id) {
        this.idEspaco = id;
    }

    public String getEspaco() {
        return espaco;
    }

    public void setEspaco(String espaco) {
        this.espaco = espaco;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEspaco != null ? idEspaco.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Espaco)) {
            return false;
        }
        Espaco other = (Espaco) object;
        if ((this.idEspaco == null && other.idEspaco != null) || (this.idEspaco != null && !this.idEspaco.equals(other.idEspaco))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.Espaco[ id=" + idEspaco + " ]";
    }
    
}
